package com.ant.storage.dto;

import com.ant.storage.common.PageRequest;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author hzd
 * @version 1.0
 * @date 2022/4/14 11:41
 */
@Data
public class CommodityDto extends PageRequest {
    private static final long serialVersionUID = 1L;

    @TableId(value = "commodity_id", type = IdType.AUTO)
    private Integer commodityId;

    @ApiModelProperty(value = "城市id")
    private Integer cityId;

    @ApiModelProperty(value = "条形码")
    @TableField("commodity_bar_code")
    private String commodityBarCode;

    @NotEmpty( message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称")
    @TableField("commodity_name")
    private String commodityName;

    @NotEmpty( message = "单位不能为空")
    @ApiModelProperty(value = "单位")
    @TableField("commodity_units")
    private String commodityUnits;

    @NotEmpty( message = "规格不能为空")
    @ApiModelProperty(value = "规格")
    @TableField("commodity_specification")
    private String commoditySpecification;

    @ApiModelProperty(value = "型号")
    @TableField("commodity_model")
    private String commodityModel;

    @ApiModelProperty(value = "图片")
    @TableField("commodity_picture")
    private String commodityPicture;

    @NotNull( message = "类型不能为空")
    @ApiModelProperty(value = "类型")
    @TableField("commodity_type")
    private Integer commodityType;

    @ApiModelProperty(value = "指导销售价")
    @TableField("commodity_price")
    private BigDecimal commodityPrice;

    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField("creation_by")
    private String creationBy;

    @TableField("creation_time")
    private Date creationTime;
 
    private String commodityTypes;

}
